<template>
	<view class="tabBar">
	   <view class="tabBar-box">
		   <image lazy-load="true"  src="../../static/images/tabBar.png" mode="widthFix" class="tabBar-img"></image>
		   <view class="tabBar-list">
			   <view class="list-t">
				   <image lazy-load="true"  src="../../static/images/home.png" class="home" @click="active(1)" v-if="active_num!=1"></image>
				   <image lazy-load="true"  src="../../static/images/home1.png" class="home" @click="active(1)" v-if="active_num==1"></image>
			   </view>
			   <view class="list-t">
				   <image lazy-load="true"  src="../../static/images/underlineshop.png" class="underlineshop"  @click="active(2)" v-if="active_num!=2"></image>
				   <image lazy-load="true"  src="../../static/images/underlineshop1.png" class="underlineshop"  @click="active(2)" v-if="active_num==2"></image>
			   </view>
			   <view class="list-t">
				   <image lazy-load="true"  src="../../static/images/sharebox.png" class="sharebox"  @click="active(3)" v-if="active_num!=3"></image>
				   <image lazy-load="true"  src="../../static/images/sharebox1.png" class="sharebox"  @click="active(3)" v-if="active_num==3"></image>
			   </view>
			   <view class="list-t">
				   <image lazy-load="true"  src="../../static/images/lottery.png" class="lottery"  @click="active(4)" v-if="active_num!=4"></image>
				   <image lazy-load="true"  src="../../static/images/lottery1.png" class="lottery"  @click="active(4)" v-if="active_num==4"></image>
			   </view>
			   <view class="list-t">
				   <image lazy-load="true"  src="../../static/images/main.png" class="main"  @click="active(5)" v-if="active_num!=5"></image>
				   <image lazy-load="true"  src="../../static/images/main1.png" class="main"  @click="active(5)" v-if="active_num==5"></image>
			   </view>
		   </view>
	   </view>
	</view>
</template>
 
<script>
export default {
  data() {
    return {
          // active_num:1
    }
  },
  props:{
	 active_num:{
				type:Number,
				default:1
	}
  },
  methods: {
     active(num){
		 
		 if(num==1){
			 uni.reLaunch({
			     url: '../index/index'
			 });
			 
		 }
		 if(num==2){
		 	uni.reLaunch({
		 	    url: '../../pages/shop/shop'
		 	});	
		 }
		 if(num==3){
		 	uni.reLaunch({
		 	    url: '../share/share'
		 	});	
		 }
		 if(num==4){
		 	uni.reLaunch({
		 	    url: '../../pages/guaguaka/guaguaka'
		 	});		 
		 }
		 if(num==5){
		 	uni.reLaunch({
		 	    url: '../main/main'
		 	});	
		 }
	 }
    
  }
}
</script>
<style>
    @import url("tabBar.css");
</style>